package com.tsunami.authority.entity.core;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tsunami.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 组织表
 * </p>
 *
 * @author lx
 * @since 2021-09-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("tnm_core_org")
@ApiModel(value="Org", description="组织")
public class Org extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户号")
    @TableField(value = "tenant_id")
    private Long tenantId;

    @ApiModelProperty(value = "组织名称")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty(value = "简称")
    @TableField(value = "abbreviation")
    private String abbreviation;

    @ApiModelProperty(value = "父ID")
    @TableField(value = "parent_id")
    private Long parentId;

    @ApiModelProperty(value = "树结构")
    @TableField(value = "tree_path")
    private String treePath;

    @ApiModelProperty(value = "排序")
    @TableField(value = "sort")
    private Integer sort;

    @ApiModelProperty(value = "状态")
    @TableField(value = "status")
    private Boolean status;

    @ApiModelProperty(value = "描述")
    @TableField(value = "describe_")
    private String describe;

}
